<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        div {
            width: 200px;
            height: 30px;
            background-color: #000;
            color: #fff;
            text-align: center;
            line-height: 30px;
            margin: 10px auto;
        }
    </style>
    <script>
        window.onload = function () {
            var ri = document.getElementById("ri");
            var xinqi=document.getElementById("xinqi");
            var xinqi_arr=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]
            var date= new Date();
            ri.innerHTML=(date.getMonth()+1)+"月"+date.getDate()+"日";
            xinqi.innerHTML=date.getFullYear()+"年"+xinqi_arr[date.getDay()];
        }
    </script>
</head>
<body>
<div id="xinqi"></div>
<div id="ri">15日</div>
</body>
</html>